package br.com.jbssistemas.dirfweb.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * Renato Machado
 *
 */
public class ConectionRelatorio {

    public static Connection getConexao() throws ClassNotFoundException,
            SQLException {
        Class.forName("org.postgresql.Driver");
        return DriverManager.getConnection(
                "jdbc:postgresql://localhost:5432/dirf031",
                "postgres", "12345");
    }

    public static void main(String[] args) {
        try {
            System.out.println(getConexao());
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
